<?php


namespace App\Models\MainDB;


use Illuminate\Database\Eloquent\Model;

class InsiderUser extends Model
{
    protected $table = 'ln_insider_user';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    public $timestamps = false;

    protected $fillable = [
        'id',
        'user_id',
        'remark_content',
        'admin_id',
        'add_time',
        'deleted',
    ];

    // 用户信息
    public function user_data(){
        return $this->hasOne('App\Models\MainDB\UserData','user_id','user_id');
    }

    // 用户
    public function user(){
        return $this->hasOne('App\Models\MainDB\User','user_id','user_id');
    }

    // 管理员信息
    public function admin(){
        return $this->hasOne('App\Models\MainDB\Admin','admin_id','admin_id');
    }
}